﻿//类描述 显示表格及js实体

Ext.define('ContractManage', {
    extend: 'Ext.data.Model',
    fields: [
        "Id"
        , "Name"//合同名称
        , "Code"//合同编号
		, "CompanyName"   //甲方名称
		, "CompanyID"   //甲方ID
		, "HroName"   //乙方名称
		, "HroID"   //乙方ID
		, "SignDateTime"   //签订日期
		, "StartDateTime"   //合同起始日期
		, "EndDateTime"   //合同截止日期
		, "EffectiveDate"   //合同有效期
		, "ConstractType"   //合同类型
		, "ConstractState"   //合同状态
		, "ConstractScale"   //合同规模
		, "AdjunctName"   //合同附件
		, "AdjunctID"   //合同附件ID
		, "Remarks"   //备注
				    ],
    idProperty: "Id"
});

Ext.define("SHApp.ClientInfo.BagManage.ContractComboBox", {
    extend: "BLBTSystem.CmbData",
    alias: "widget.contractComboBox",
    dataUrl: "api/contractmanage?format=json",
    model: "ContractManage",
    matchFieldWidth: false,
    sorters: [{
        property: 'Name',
        direction: 'ASC'
    }],
    listConfig: {
        resizable: true,
        width: 300
    },
    minChars: 1,
    valueField: "Code",
    displayField: "Name",
    maxLength: 100,
    forceSelection: false,
    initComponent: function () {
        Ext.apply(this);
        this.callParent(arguments);
    }
});